<template>
	<view>
		<view class="search-box" @click="clickHandler">
			<view class="search">
				<!-- 图标 -->
				<uni-icons type="search"></uni-icons>
				<!-- 搜索文字 -->
				<text class="search-text">搜索</text>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name:"SearchBar",
		data() {
			return {
				
			};
		},
		methods:{
			clickHandler(){
				this.$emit('search')
				uni.navigateTo({
					url:'/subpkg/search/search'
				})
			}
		}
	}
</script>

<style lang="scss">
	.search-box {
		background-color: #c00000;
		height: 100rpx;
		display: flex;
		justify-content: center;
		align-items: center;
		
		.search {
			width: 90%;
			height: 80rpx;
			background-color: #fff;
			border-radius: 20px;
			display: flex;
			justify-content: center;
			align-items: center;
			
			.search-text {
				margin-left: 8rpx;
				font-size: 28rpx;
			}
		}
	}
</style>
